package com.gjy.mywork.controller;

import org.springframework.stereotype.Controller;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 基础页面跳转
 * @author gxy
 *	2018年11月8日
 *	my-work
 * 	success when you begin
 */
@Controller
@RequestMapping(value="/jk")
public class IndexController {
	
	@GetMapping(value="/{floder}/{file}")
	public String returnPage(@PathVariable String floder,@PathVariable String file) {
		
		Assert.hasText(floder, "文档位置必填");
		Assert.hasText(file, "页面必填");
		
		if(floder.equals("wbs") && file.equals("si")) {
			return "/wbs/websocketIndex";
		}
		
		return "/"+floder+"/"+file;
	}

}
